import {routes} from '@/router'

const state = {
  menuData: [],
}

const mutations = {
  SET_MENU_DATA: (state, menuData) => {
    state.menuData = menuData;
  },
 
}

const actions = {
  // 获取全局data
  getMenuData({ commit }) {
    commit('SET_MENU_DATA',  routes[0].children);
  },
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
